package 笔试.微众;

import java.util.Calendar;
import java.util.Scanner;

/**
 * @author:谢君臣
 * @Date:2021/8/29-9:15
 * @version:1.0
 * @function:
 */
public class 第一天周一 {
    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();
        Scanner scanner = new Scanner(System.in);
        int start = scanner.nextInt();
        int end = scanner.nextInt();
        int count= 0;
        for (int i = start; i <= end; i++) {
            for (int j = 1; j <=12 ; j++) {
                calendar.set(i,j,1);
                if (calendar.get(Calendar.DAY_OF_WEEK)==Calendar.MONDAY) {
                    count++;
                }
            }
        }
        System.out.println(count);
    }
}
